<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			body{
				padding: 0;
				margin: 0;
				background:#eee;
				overflow: hidden;
			}
			a{
				text-decoration: none;
				color: #333;
			}
			.zhezhi{
				position: absolute;
				left: 50%;
				margin-left: -150px;
				top: 100px;
				width: 300px;
				
			}
			.item{
				position: relative;
				width: 300px;
			}
			.item>.item{
				
			}
			.text{
				position: relative;
				z-index: 1;
				display: block;
				height: 40px;
				line-height: 40px;
				text-indent: 20px;
				border: 1px solid #ddd;
				background: #fff;
			}
			.bg{
				position: absolute;
				left: 0;
				top: 0;
				display: block;
				height: 40px;
				width: 100%;
				line-height: 40px;
				text-indent: 20px;
				border-bottom: 1px solid #eee;
				background: #ccc;
				z-index: 2;
				-webkit-transform: rotateX(-90deg);
				transform: rotateX(-90deg);
			}
		</style>
	</head>
	<body>
		<div class="zhezhi">
			
		</div>
		<script src="src/minified/TweenMax.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			"use strict"
			var arr = ['list01','list02','list03','list04','list05','list06','list07','list08','list09']
			// 递归渲染list
			function render(data,index){
				return `
				<div class="item">
					<a class="text" href="javascript:;">${data[index]}</a>
					<span class="bg"></span>
					${
						index<data.length-1?render(data,index+1):''
					}
				</div>
				`
			};
			var template = render(arr,0)
			// 插入list
			document.querySelector('.zhezhi').innerHTML=template
			
			
 			var t = new TimelineMax()
			//t.set('.zhezhi',{'transformOrigin':'center top','transformPerspective':1200,'rotationY':'80'})
 			t.set('.item',{'transformOrigin':'center top','transformPerspective':300})
 			t.staggerFrom('.item',1,{
 				rotationX:function(index,item){
 					console.log(item);
 					return 180
 				}
 			},0.2)
			
		</script>
	</body>
</html>
